﻿using System;
using System.Collections.Generic;
using UnityEngine;

public class PlayerIdle : PlayerBaseState {
	public PlayerIdle(PlayerController controller, PlayerStateEnum stateName, State<PlayerStateEnum> superFSM, StateFactory<PlayerStateEnum> factory) : base(controller, stateName, superFSM, factory) {
		AddConditionToSelf(() => !controller.IsTouchCeiling && !controller.DownInput);

		AddNewTransition(PlayerStateEnum.CrouchIdle, () => controller.DownInput);

	}

	public override void Enter() {
        _controller.Velocity = new Vector2(0, _controller.Velocity.y);
        _controller.PlayAnim(PlayerStateEnum.Idle);
		//_controller.IsAnimPlayOver();
	}

	public override void Exit() {

	}

}